/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ProjetoCompreJa.GUI;

import ProjetoCompreJa.ClassesBasicas.ClienteCJ;
import ProjetoCompreJa.FachadaCJ;
import java.util.List;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Marcos
 */
public class GerenciarCliente_CJ extends javax.swing.JFrame {

    private List<ClienteCJ> Clientes;

    /**
     * Creates new form GerenciarCliente
     */
    public GerenciarCliente_CJ() {
        initComponents();
        jLabelCodigo.setVisible(false);
        jButtonSalvar.enable(false);
    }

    public void ListarClientes() {
        try {
            FachadaCJ f = new FachadaCJ();
            this.Clientes = f.ListarClientes();
            DefaultTableModel modelo = new DefaultTableModel();
            modelo.setColumnIdentifiers(new String[]{"Nome", "Estado", "Sexo"});
            for (ClienteCJ cliente : this.Clientes) {
                modelo.addRow(new Object[]{cliente.getNome(),
                    cliente.getEndereco().getEstado(),
                    cliente.getSexo()});
            }

            jTableCliente.setModel(modelo);

        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());

        }
    }

    private void ListarClientesPorNome(ClienteCJ cli) {
        try {
            FachadaCJ f = new FachadaCJ();
            this.Clientes = f.ListarClientesPorNome(cli);
            DefaultTableModel modelo = new DefaultTableModel();
            modelo.setColumnIdentifiers(new String[]{"Nome", "Estado", "Sexo"});
            for (ClienteCJ cliente : this.Clientes) {
                modelo.addRow(new Object[]{cliente.getNome(),
                    cliente.getEndereco().getEstado(),
                    cliente.getSexo()});
            }

            jTableCliente.setModel(modelo);

        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());

        }
    }

    private void ListarClientesPorEstado(ClienteCJ cli) {
        try {
            FachadaCJ f = new FachadaCJ();
            this.Clientes = f.ListarClientesPorEstado(cli);
            DefaultTableModel modelo = new DefaultTableModel();
            modelo.setColumnIdentifiers(new String[]{"Estado", "Nome", "Sexo"});
            for (ClienteCJ cliente : this.Clientes) {
                modelo.addRow(new Object[]{cliente.getEndereco().getEstado(),
                    cliente.getNome(),
                    cliente.getSexo()});
            }

            jTableCliente.setModel(modelo);

        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());

        }
    }

    private void ListarClientesPorSexo(ClienteCJ cli) {
        try {
            FachadaCJ f = new FachadaCJ();
            this.Clientes = f.ListarClientesPorSexo(cli);
            DefaultTableModel modelo = new DefaultTableModel();
            modelo.setColumnIdentifiers(new String[]{"Sexo", "Nome", "Estado"});
            for (ClienteCJ cliente : this.Clientes) {
                modelo.addRow(new Object[]{cliente.getSexo(),
                    cliente.getNome(),
                    cliente.getEndereco().getEstado()});
            }

            jTableCliente.setModel(modelo);

        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());

        }
    }

    private void LimparDados() {
        jTextFieldBairro.setText(null);
        jTextFieldCPF.setText(null);
        jTextFieldComplemento.setText(null);
        jTextFieldNome.setText(null);
        jTextFieldNumero.setText(null);
        jTextFieldRG.setText(null);
        jTextFieldRua.setText(null);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        jPanelDados = new javax.swing.JPanel();
        jLabelNome = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jTextFieldNome = new javax.swing.JTextField();
        jComboBoxSexo = new javax.swing.JComboBox();
        jTextFieldRG = new javax.swing.JTextField();
        jTextFieldCPF = new javax.swing.JTextField();
        jLabel = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jTextFieldRua = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jTextFieldComplemento = new javax.swing.JTextField();
        jTextFieldNumero = new javax.swing.JTextField();
        jComboBoxEstado = new javax.swing.JComboBox();
        jComboBoxCidade = new javax.swing.JComboBox();
        jTextFieldBairro = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();
        jButtonSair = new javax.swing.JButton();
        jButtonCancelar = new javax.swing.JButton();
        jButtonCadastro = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTableCliente = new javax.swing.JTable();
        jRadioButtonNome = new javax.swing.JRadioButton();
        jRadioButtonEstado = new javax.swing.JRadioButton();
        jRadioButtonSexo = new javax.swing.JRadioButton();
        jTextFieldPesquisa = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jButtonSalvar = new javax.swing.JButton();
        jLabelCodigo = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanelDados.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Dados Clientes", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), new java.awt.Color(51, 0, 255))); // NOI18N

        jLabelNome.setText("Nome:");

        jLabel4.setText("Sexo:");

        jLabel5.setText("RG:");

        jTextFieldNome.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextFieldNomeKeyTyped(evt);
            }
        });

        jComboBoxSexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Masculino", "Feminino" }));
        jComboBoxSexo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxSexoActionPerformed(evt);
            }
        });

        jTextFieldRG.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextFieldRGKeyTyped(evt);
            }
        });

        jTextFieldCPF.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                jTextFieldCPFKeyTyped(evt);
            }
        });

        jLabel.setText("CPF:");

        jLabel9.setText("Rua:");

        jLabel2.setText("Complemento:");

        jLabel3.setText("Numero:");

        jLabel8.setText("Estado:");

        jLabel10.setText("Cidade:");

        jLabel11.setText("Bairro:");

        jComboBoxEstado.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "", "AL", "BA", "MA", "PB", "PE", "RN" }));
        jComboBoxEstado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxEstadoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelDadosLayout = new javax.swing.GroupLayout(jPanelDados);
        jPanelDados.setLayout(jPanelDadosLayout);
        jPanelDadosLayout.setHorizontalGroup(
            jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDadosLayout.createSequentialGroup()
                .addGroup(jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                        .addGroup(jPanelDadosLayout.createSequentialGroup()
                            .addContainerGap()
                            .addGroup(jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanelDadosLayout.createSequentialGroup()
                                    .addComponent(jLabel4)
                                    .addGap(22, 22, 22)
                                    .addComponent(jComboBoxSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(49, 49, 49))
                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDadosLayout.createSequentialGroup()
                                    .addComponent(jLabel5)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jTextFieldRG)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)))
                            .addComponent(jLabel)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jTextFieldCPF, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanelDadosLayout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jLabel9)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jTextFieldRua, javax.swing.GroupLayout.PREFERRED_SIZE, 298, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanelDadosLayout.createSequentialGroup()
                            .addGap(10, 10, 10)
                            .addComponent(jLabelNome)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(jTextFieldNome, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanelDadosLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanelDadosLayout.createSequentialGroup()
                                .addComponent(jLabel11)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldBairro, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanelDadosLayout.createSequentialGroup()
                                .addComponent(jLabel3)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldNumero, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanelDadosLayout.createSequentialGroup()
                                .addComponent(jLabel2)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldComplemento, javax.swing.GroupLayout.PREFERRED_SIZE, 258, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanelDadosLayout.createSequentialGroup()
                                    .addComponent(jLabel8)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jComboBoxEstado, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanelDadosLayout.createSequentialGroup()
                                    .addComponent(jLabel10)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jComboBoxCidade, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))))))
                .addContainerGap(70, Short.MAX_VALUE))
        );
        jPanelDadosLayout.setVerticalGroup(
            jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDadosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelNome)
                    .addComponent(jTextFieldNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(jComboBoxSexo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel)
                    .addComponent(jTextFieldCPF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5)
                    .addComponent(jTextFieldRG, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(jTextFieldRua, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jTextFieldComplemento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(jTextFieldNumero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(jComboBoxEstado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(jComboBoxCidade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDadosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(jTextFieldBairro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jButtonSair.setText("Sair");
        jButtonSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSairActionPerformed(evt);
            }
        });

        jButtonCancelar.setText("Cancelar");
        jButtonCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonCancelarActionPerformed(evt);
            }
        });

        jButtonCadastro.setText("TesteCadastrar");
        jButtonCadastro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonCadastroActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jButtonCancelar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButtonSair, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(jButtonCadastro)))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(jButtonCadastro)
                .addGap(117, 117, 117)
                .addComponent(jButtonCancelar)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 110, Short.MAX_VALUE)
                .addComponent(jButtonSair))
        );

        jTableCliente.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jTableCliente.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTableClienteMouseClicked(evt);
            }
        });
        jScrollPane1.setViewportView(jTableCliente);

        buttonGroup1.add(jRadioButtonNome);
        jRadioButtonNome.setText("Buscar por Nome");
        jRadioButtonNome.setActionCommand("buscar por Nome");

        buttonGroup1.add(jRadioButtonEstado);
        jRadioButtonEstado.setText("Buscar por Estado");
        jRadioButtonEstado.setActionCommand("");
        jRadioButtonEstado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonEstadoActionPerformed(evt);
            }
        });

        buttonGroup1.add(jRadioButtonSexo);
        jRadioButtonSexo.setText("Buscar por Sexo");
        jRadioButtonSexo.setActionCommand("buscar por Sexo");

        jButton1.setText("Buscar");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jButtonSalvar.setText("Salvar");
        jButtonSalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSalvarActionPerformed(evt);
            }
        });

        jLabel12.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
        jLabel12.setText("Compre-Já");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane1))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jRadioButtonNome)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(jTextFieldPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(42, 42, 42)
                                        .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jRadioButtonEstado)
                                    .addComponent(jRadioButtonSexo))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 439, Short.MAX_VALUE))))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanelDados, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(jLabel12)
                                .addGap(0, 0, Short.MAX_VALUE)))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabelCodigo)
                            .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButtonSalvar, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel12)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanelDados, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabelCodigo)
                .addGap(26, 26, 26)
                .addComponent(jRadioButtonNome)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jRadioButtonEstado)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jRadioButtonSexo)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldPesquisa, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(21, 21, 21)
                .addComponent(jButtonSalvar)
                .addGap(5, 5, 5))
        );

        jPanelDados.getAccessibleContext().setAccessibleName("");

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jTextFieldNomeKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldNomeKeyTyped
        // TODO add your handling code here:
        //char car=evt.getKeyChar();
        //if((car<'a' || car>'z') && (car<'A' || car>'Z')&&(car<' '||car>' ')) evt.consume();

    }//GEN-LAST:event_jTextFieldNomeKeyTyped

    private void jComboBoxSexoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxSexoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jComboBoxSexoActionPerformed

    private void jTextFieldRGKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldRGKeyTyped
        // TODO add your handling code here:
        //char car=evt.getKeyChar();
        //if(  jTextFieldRG.getText().length()>=8)evt.consume();
        //if((car<'0' || car>'9') ) evt.consume();

    }//GEN-LAST:event_jTextFieldRGKeyTyped

    private void jTextFieldCPFKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldCPFKeyTyped
        // TODO add your handling code here:
        //char car=evt.getKeyChar();
        //  if(  jTextFieldCPF.getText().length()>=11)evt.consume();
        //if((car<'0' || car>'9') ) evt.consume();
    }//GEN-LAST:event_jTextFieldCPFKeyTyped

    private void jComboBoxEstadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboBoxEstadoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jComboBoxEstadoActionPerformed

    private void jButtonSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSairActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonSairActionPerformed

    private void jButtonCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancelarActionPerformed
        LimparDados();
    }//GEN-LAST:event_jButtonCancelarActionPerformed

    private void jRadioButtonEstadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonEstadoActionPerformed

    }//GEN-LAST:event_jRadioButtonEstadoActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        try {
            ClienteCJ cli = new ClienteCJ();
            if (jRadioButtonNome.isSelected()) {
                cli.setNome(jTextFieldPesquisa.getText());
                ListarClientesPorNome(cli);
            } else if (jRadioButtonEstado.isSelected()) {
                cli.getEndereco().setEstado(jTextFieldPesquisa.getText());
                ListarClientesPorEstado(cli);
            } else if (jRadioButtonSexo.isSelected()) {
                if ("Masculino".equals(jTextFieldPesquisa.getText()) || "Feminino".equals(jTextFieldPesquisa.getText())) {
                    cli.setSexo(jTextFieldPesquisa.getText());
                    ListarClientesPorSexo(cli);
                } else {
                    JOptionPane.showMessageDialog(rootPane, "Para sexo informe Masculino ou Feminino");
                    jTextFieldPesquisa.setText(null);
                }
            }
        } catch (Exception ex) {
            JOptionPane.showConfirmDialog(rootPane, ex.getMessage());
        }
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jTableClienteMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableClienteMouseClicked
        int posicao = jTableCliente.getSelectedRow();
        String a = jTextFieldPesquisa.getText();
        OpcaoCliente_CJ op = new OpcaoCliente_CJ();
        if (jRadioButtonNome.isSelected()) {
            op.Recuperar(posicao, "nome", a);
            op.show();
            dispose();
        } else if (jRadioButtonEstado.isSelected()) {
            op.Recuperar(posicao, "estado", a);
            op.show();
            dispose();
        } else if (jRadioButtonSexo.isSelected()) {
            op.Recuperar(posicao, "sexo", a);
            op.show();
            dispose();
        } else {
            op.Recuperar(posicao, null, a);
            op.show();
            dispose();
        }

    }//GEN-LAST:event_jTableClienteMouseClicked

    private void jButtonSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSalvarActionPerformed
        String estado = (String) jComboBoxEstado.getSelectedItem();
        String cidade = (String) jComboBoxCidade.getSelectedItem();
        String sexo = (String) jComboBoxSexo.getSelectedItem();

        try {
            ClienteCJ cli = new ClienteCJ();
            cli.setNome(jTextFieldNome.getText());
            cli.setSexo(sexo);
            cli.setId(Integer.parseInt(jLabelCodigo.getText()));
            cli.getEndereco().setRua(jTextFieldRua.getText());
            cli.getEndereco().setCidade(cidade);
            cli.getEndereco().setEstado(estado);
            cli.getEndereco().setBairro(jTextFieldBairro.getText());
            cli.getEndereco().setComplemento(jTextFieldComplemento.getText());
            cli.setCpf(jTextFieldCPF.getText());
            cli.setRg(jTextFieldRG.getText());
            cli.setLogin(jTextFieldCPF.getText());
            cli.setSenha("");
            FachadaCJ fachada = new FachadaCJ();
            fachada.AlterarCliente(cli);
            LimparDados();
            ListarClientes();
            jButtonSalvar.enable(false);
            JOptionPane.showMessageDialog(rootPane, "Cliente Alterado com sucesso");
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());
        }
    }//GEN-LAST:event_jButtonSalvarActionPerformed

    private void jButtonCadastroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCadastroActionPerformed
        String estado = (String) jComboBoxEstado.getSelectedItem();
        String cidade = "Recife";
        String sexo = (String) jComboBoxSexo.getSelectedItem();

        try {
            ClienteCJ cli = new ClienteCJ();
            cli.setNome(jTextFieldNome.getText());
            cli.setSexo(sexo);
            cli.getEndereco().setRua(jTextFieldRua.getText());
            cli.getEndereco().setCidade(cidade);
            cli.getEndereco().setEstado(estado);
            cli.getEndereco().setBairro(jTextFieldBairro.getText());
            cli.getEndereco().setComplemento(jTextFieldComplemento.getText());
            cli.setCpf(jTextFieldCPF.getText());
            cli.setRg(jTextFieldRG.getText());
            cli.setLogin(jTextFieldCPF.getText());
            cli.setSenha("");
            FachadaCJ fachada = new FachadaCJ();
            fachada.CadastrarCliente(cli);
            JOptionPane.showMessageDialog(rootPane, "Cliente Cadastrado com sucesso");
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());
        }        // TODO add your handling code here:
    }//GEN-LAST:event_jButtonCadastroActionPerformed

    private void ListarEstado(String estado) {
        try {
            if (null != estado) {
                switch (estado) {
                    case "PE": {
                        DefaultComboBoxModel modelo = new DefaultComboBoxModel();
                        modelo.addElement("PE");
                        modelo.addElement("AL");
                        modelo.addElement("BA");
                        modelo.addElement("PB");
                        modelo.addElement("MA");
                        jComboBoxCidade.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"Recife"}));
                        jComboBoxEstado.setModel(modelo);
                        break;
                    }
                    case "PB": {
                        DefaultComboBoxModel modelo = new DefaultComboBoxModel();
                        modelo.addElement("PB");
                        modelo.addElement("AL");
                        modelo.addElement("BA");
                        modelo.addElement("PE");
                        modelo.addElement("MA");
                        jComboBoxCidade.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"João Pessoa"}));
                        jComboBoxEstado.setModel(modelo);
                        break;
                    }
                    case "AL": {
                        DefaultComboBoxModel modelo = new DefaultComboBoxModel();
                        modelo.addElement("AL");
                        modelo.addElement("BA");
                        modelo.addElement("PE");
                        modelo.addElement("PB");
                        modelo.addElement("MA");
                        jComboBoxCidade.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"Maceío"}));
                        jComboBoxEstado.setModel(modelo);
                        break;
                    }
                    case "BA": {
                        DefaultComboBoxModel modelo = new DefaultComboBoxModel();
                        modelo.addElement("AL");
                        modelo.addElement("PE");
                        modelo.addElement("PB");
                        modelo.addElement("PB");
                        modelo.addElement("MA");
                        jComboBoxCidade.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"Salvador"}));
                        jComboBoxEstado.setModel(modelo);
                        break;
                    }
                    case "MA": {
                        DefaultComboBoxModel modelo = new DefaultComboBoxModel();
                        modelo.addElement("MA");
                        modelo.addElement("AL");
                        modelo.addElement("BA");
                        modelo.addElement("PE");
                        modelo.addElement("PB");
                        jComboBoxCidade.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"São Luis"}));
                        jComboBoxEstado.setModel(modelo);
                        break;
                    }
                }
            }
            /*FachadaCJ f = new FachadaCJ();
             this.clicionarios = f.ListarClientes();
             DefaultComboBoxModel modelo = new DefaultComboBoxModel();
             for (ClienteCJ cli : this.clicionarios) {
             modelo.addElement(cli.getEndereco().getCidade());
             }
             jComboBoxCidade.setModel(modelo);*/
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());
        }
    }

    private void ListarSexo(String estado) {
        try {
            if (null != estado) {
                switch (estado) {
                    case "Masculino": {
                        DefaultComboBoxModel modelo = new DefaultComboBoxModel();
                        modelo.addElement("Masculino");
                        modelo.addElement("Feminino");
                        jComboBoxSexo.setModel(modelo);
                        break;
                    }
                    case "Feminino": {
                        DefaultComboBoxModel modelo = new DefaultComboBoxModel();
                        modelo.addElement("Feminino");
                        modelo.addElement("Masculino");
                        jComboBoxSexo.setModel(modelo);
                        break;
                    }

                }
            }

        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());
        }
    }

    public void Alterar(int a) {
        try {
            jButtonSalvar.enable(true);
            FachadaCJ f = new FachadaCJ();
            int posicao = a;
            Clientes = f.ListarClientes();
            String nome = Clientes.get(posicao).getNome();
            jTextFieldNome.setText(nome);
            int codigo = Clientes.get(posicao).getId();
            jLabelCodigo.setText("" + codigo);
            String cpf = Clientes.get(posicao).getCpf();
            jTextFieldCPF.setText(cpf);
            String rg = Clientes.get(posicao).getRg();
            jTextFieldRG.setText(rg);
            String bairro = Clientes.get(posicao).getEndereco().getBairro();
            jTextFieldBairro.setText(bairro);
            String logradouro = Clientes.get(posicao).getEndereco().getRua();
            jTextFieldRua.setText(logradouro);
            String estado = Clientes.get(posicao).getEndereco().getEstado();
            ListarEstado(estado);
            String sexo = Clientes.get(posicao).getSexo();
            ListarSexo(sexo);
            int numero = Clientes.get(posicao).getEndereco().getNumero();
            jTextFieldNumero.setText("" + numero);
            String complemento = Clientes.get(posicao).getEndereco().getComplemento();
            jTextFieldComplemento.setText(complemento);
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());
        }
    }

    public void AlterarPorNome(int a, String b) {
        try {
            jButtonSalvar.enable(true);
            FachadaCJ f = new FachadaCJ();
            ClienteCJ cli = new ClienteCJ();
            int posicao = a;
            cli.setNome(b);
            Clientes = f.ListarClientesPorNome(cli);
            String nome = Clientes.get(posicao).getNome();
            jTextFieldNome.setText(nome);
            int codigo = Clientes.get(posicao).getId();
            jLabelCodigo.setText("" + codigo);
            String cpf = Clientes.get(posicao).getCpf();
            jTextFieldCPF.setText(cpf);
            String rg = Clientes.get(posicao).getRg();
            jTextFieldRG.setText(rg);
            String bairro = Clientes.get(posicao).getEndereco().getBairro();
            jTextFieldBairro.setText(bairro);
            String logradouro = Clientes.get(posicao).getEndereco().getRua();
            jTextFieldRua.setText(logradouro);
            String estado = Clientes.get(posicao).getEndereco().getEstado();
            ListarEstado(estado);
            String sexo = Clientes.get(posicao).getSexo();
            ListarSexo(sexo);
            int numero = Clientes.get(posicao).getEndereco().getNumero();
            jTextFieldNumero.setText("" + numero);
            String complemento = Clientes.get(posicao).getEndereco().getComplemento();
            jTextFieldComplemento.setText(complemento);
            ListarClientes();
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());
        }
    }

    public void AlterarPorEstado(int a, String b) {
        try {
            jButtonSalvar.enable(true);
            FachadaCJ f = new FachadaCJ();
            int posicao = a;
            ClienteCJ cli = new ClienteCJ();
            cli.getEndereco().setEstado(b);
            Clientes = f.ListarClientesPorEstado(cli);
            String nome = Clientes.get(posicao).getNome();
            jTextFieldNome.setText(nome);
            int codigo = Clientes.get(posicao).getId();
            jLabelCodigo.setText("" + codigo);
            String cpf = Clientes.get(posicao).getCpf();
            jTextFieldCPF.setText(cpf);
            String rg = Clientes.get(posicao).getRg();
            jTextFieldRG.setText(rg);
            String bairro = Clientes.get(posicao).getEndereco().getBairro();
            jTextFieldBairro.setText(bairro);
            String logradouro = Clientes.get(posicao).getEndereco().getRua();
            jTextFieldRua.setText(logradouro);
            String estado = Clientes.get(posicao).getEndereco().getEstado();
            ListarEstado(estado);
            String sexo = Clientes.get(posicao).getSexo();
            ListarSexo(sexo);
            int numero = Clientes.get(posicao).getEndereco().getNumero();
            jTextFieldNumero.setText("" + numero);
            String complemento = Clientes.get(posicao).getEndereco().getComplemento();
            jTextFieldComplemento.setText(complemento);
            ListarClientes();
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());
        }
    }

    public void AlterarPorSexo(int a, String b) {
        try {
            jButtonSalvar.enable(true);
            FachadaCJ f = new FachadaCJ();
            int posicao = a;
            ClienteCJ cli = new ClienteCJ();
            cli.setSexo(b);
            Clientes = f.ListarClientesPorSexo(cli);
            String nome = Clientes.get(posicao).getNome();
            jTextFieldNome.setText(nome);
            int codigo = Clientes.get(posicao).getId();
            jLabelCodigo.setText("" + codigo);
            String cpf = Clientes.get(posicao).getCpf();
            jTextFieldCPF.setText(cpf);
            String rg = Clientes.get(posicao).getRg();
            jTextFieldRG.setText(rg);
            String bairro = Clientes.get(posicao).getEndereco().getBairro();
            jTextFieldBairro.setText(bairro);
            String logradouro = Clientes.get(posicao).getEndereco().getRua();
            jTextFieldRua.setText(logradouro);
            String estado = Clientes.get(posicao).getEndereco().getEstado();
            ListarEstado(estado);
            String sexo = Clientes.get(posicao).getSexo();
            ListarSexo(sexo);
            int numero = Clientes.get(posicao).getEndereco().getNumero();
            jTextFieldNumero.setText("" + numero);
            String complemento = Clientes.get(posicao).getEndereco().getComplemento();
            jTextFieldComplemento.setText(complemento);
            ListarClientes();
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());
        }
    }

    public void Excluir(int b) {
        try {
            FachadaCJ f = new FachadaCJ();
            this.Clientes = f.ListarClientes();
            ClienteCJ delete = this.Clientes.get(b);
            f.ExcluirCliente(delete);
            ListarClientes();
            LimparDados();
            JOptionPane.showMessageDialog(null, "Dados removidos com Sucesso!");
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());
        }
    }

    public void ExcluirPorNome(int b, String a) {
        try {
            FachadaCJ f = new FachadaCJ();
            ClienteCJ delete = new ClienteCJ();
            delete.setNome(a);
            int posicao = b;
            Clientes = f.ListarClientesPorNome(delete);
            int id = Clientes.get(posicao).getId();
            delete.setId(id);

            f.ExcluirCliente(delete);
            ListarClientes();
            LimparDados();
            JOptionPane.showMessageDialog(null, "Dados removidos com Sucesso!");
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());
        }
    }

    public void ExcluirPorEstado(int b, String a) {
        try {
            FachadaCJ f = new FachadaCJ();
            ClienteCJ cli = new ClienteCJ();
            cli.getEndereco().setEstado(a);
            Clientes = f.ListarClientesPorEstado(cli);
            ClienteCJ delete = this.Clientes.get(b);
            f.ExcluirCliente(delete);
            ListarClientes();
            LimparDados();
            JOptionPane.showMessageDialog(null, "Dados removidos com Sucesso!");
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());
        }
    }

    public void ExcluirPorSexo(int b, String a) {
        try {
            FachadaCJ f = new FachadaCJ();
            ClienteCJ cli = new ClienteCJ();
            cli.setSexo(a);
            Clientes = f.ListarClientesPorSexo(cli);
            ClienteCJ delete = this.Clientes.get(b);
            f.ExcluirCliente(delete);
            ListarClientes();
            LimparDados();
            JOptionPane.showMessageDialog(null, "Dados removidos com Sucesso!");
        } catch (Exception ex) {
            JOptionPane.showMessageDialog(rootPane, ex.getMessage());
        }
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(GerenciarCliente_CJ.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(GerenciarCliente_CJ.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(GerenciarCliente_CJ.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(GerenciarCliente_CJ.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new GerenciarCliente_CJ().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButtonCadastro;
    private javax.swing.JButton jButtonCancelar;
    private javax.swing.JButton jButtonSair;
    private javax.swing.JButton jButtonSalvar;
    private javax.swing.JComboBox jComboBoxCidade;
    private javax.swing.JComboBox jComboBoxEstado;
    private javax.swing.JComboBox jComboBoxSexo;
    private javax.swing.JLabel jLabel;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JLabel jLabelCodigo;
    private javax.swing.JLabel jLabelNome;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanelDados;
    private javax.swing.JRadioButton jRadioButtonEstado;
    private javax.swing.JRadioButton jRadioButtonNome;
    private javax.swing.JRadioButton jRadioButtonSexo;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTableCliente;
    private javax.swing.JTextField jTextFieldBairro;
    private javax.swing.JTextField jTextFieldCPF;
    private javax.swing.JTextField jTextFieldComplemento;
    private javax.swing.JTextField jTextFieldNome;
    private javax.swing.JTextField jTextFieldNumero;
    private javax.swing.JTextField jTextFieldPesquisa;
    private javax.swing.JTextField jTextFieldRG;
    private javax.swing.JTextField jTextFieldRua;
    // End of variables declaration//GEN-END:variables
}
